#ifndef _NETWORK_SERVER
#define _NETWORK_SERVER

#include <iostream>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include "Event.h"

namespace Marco
{
   class NetworkServer
   {
      public:
         NetworkServer(int port);
         ~NetworkServer();

         void Start();
         void Listen();
         Event Read();

      private:
         int    mPort;
         int    mClient;
         int    mSocket;
         struct sockaddr_in mServerAddress;
         struct sockaddr_in mClientAddress;

         float ntohf( const float inFloat );
   };
}

#endif
